<template>
  <div class="input-item">
    <div class="input-text">
      <span>{{ title }}</span>
      <!--      <span v-if="isEdit" style="cursor: pointer; color: #3c6cfe" @click="addMonthly">Add Monthly</span>-->
    </div>
    <slot></slot>
  </div>
</template>

<script setup>
import { ref } from 'vue'

const props = defineProps({
  title: String,
  isEdit: {
    type: Boolean,
    default: false
  },
  item: {
    type: Object,
    default: null
  }
})
const emits = defineEmits(['add'])
const vItem = ref(props.item)

const addMonthly = () => {
  emits('add', vItem.value)
}
</script>

<style scoped lang="less">
.input-item {
  margin-top: 24px;
  padding-left: 80px;
  .input-text {
    color: @text-gray;
    font-size: 14px;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
  }
}
</style>
